/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: LiYansheng
 * @Date: 2022-04-22 13:16:52
 * @LastEditors: CoderXZ
 * @LastEditTime: 2022-05-11 23:43:46
 */
import request from '@/utils/request'

// 获取指定教师下的班级学生就业意向
export function getClassIntent(){
    return request({
        url:'/intent/class',
        method:'get',
    })
}

// 查询
export function search(form) {
    return request({
        url: '/intent',
        method: 'post',
        data: {
            "studentName": form.studentName,
            "city": form.city,
            "post": form.post,
            "salary":form.salary,
            "pageIndex": form.pageIndex,
            "pageSize": form.pageSize
        }
    })
}

// 查询指定学生的意向
export function searchById() {
    return request({
        url: '/intent/',
        method: 'get',
    })
}

// 添加
export function add(form) {
    return request({
        url: '/intent/add',
        method: 'post',
        data: {
            "industry": form.industry,
            "salary": form.salary,
            "remark": form.remark,
            "studentId":"",
            "city": form.city+' '+form.urban,
            "post": form.post
        }
    })
}

// 删除
export function del(id) {
    return request({
        url: '/intent/delete',
        method: 'post',
        data:{
            "id":id
        }
    })
}

// 修改
export function update(form) {
    return request({
        url: '/intent/update',
        method: 'post',
        data: {
            "id": form.id,
            "industry": form.industry,
            "salary": form.salary,
            "remark": form.remark,
            "studentId":form.studentId,
            "city": form.city+' '+form.urban,
            "post": form.post
        }
    })
}

// 批量删除
export function delList(ids) {
    return request({
        url: '/intent/delList',
        method: 'post',
        data: {
            ids: ids
        }
    })
}